package com.xu.rag.interceptor;

import lombok.extern.slf4j.Slf4j;
import org.aopalliance.intercept.MethodInterceptor;
import org.aopalliance.intercept.MethodInvocation;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
/**
 * @Author: xdl
 * @CreateTime: 2025-01-15 23:02
 * @Description:
 */
@Slf4j
public class ModelInterceptor implements MethodInterceptor {

    @Nullable
    @Override
    public Object invoke(@NotNull MethodInvocation invocation) throws Throwable {
        Object[] arguments = invocation.getArguments();
//        arguments
        log.info("method interceptor {}", invocation.getMethod().getName());
        return invocation.proceed();
    }
}
